package server.game.players;

import java.util.LinkedList;
import java.util.List;

import server.content.skilling.PlayerSkill;

 

public class AntiBot {

	private final Client c;
	private final List<String> actions = new LinkedList<String>();
	public PlayerSkill skill = null;

	public AntiBot(final Client c) {
		this.c = c;
	}

	public void process() {
		if (isSkilling()) {
			if (skill == null)
				return;
			if (System.currentTimeMillis() - skill.startTime >= 15000) {
				if (!skill.antiBotEnabled()) {
					skill.enableBotProtection();
				}
			}
		} else {
			if (skill != null)
				skill = null;
		}
	}

	public boolean isSkilling() {
		/*
		for (final PlayerSkill skill : c.playerSkills) {
			if (skill == null)
				continue;
			if (skill.isActive()) {
				if (this.skill == null) {
					this.skill = skill;
					return true;
				}
			}
		}
		*/
		return false;
	}

}
